package com.rst.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;

@MappedSuperclass
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class CommonDetails implements Serializable {
	
	private static final long serialVersionUID = -452585979253252083L;
	
	private int version;
	private String strCreatedAuthor;
	private Date createdDate;
	private String strUpdatedAuthor;
	private Date updatedDate;
	
	private String fatherName;
	private String motherName;
	private String husbandName;
	private Date dob;
	private String gender;
	private String bloodGroup;
	private String phone;
	private Long cityId;
	private Long pin;
	private String photoUrl;
	private String thumbnailPhotoUrl;
	private String address;
	
	@Column(name="f_VERSION",nullable=false,columnDefinition="integer default 1")
	public int getVersion() {
		return version;
	}
	public void setVersion(int version) {
		this.version = version;
	}
	
	@Column(name="f_CREATED_AUTHOR",nullable=false,columnDefinition="varchar(20)")
	public String getStrCreatedAuthor() {
		return strCreatedAuthor;
	}
	public void setStrCreatedAuthor(String strCreatedAuthor) {
		this.strCreatedAuthor = strCreatedAuthor;
	}
	
	//@Column(name="CREATED_TS",nullable=false,columnDefinition="timestamp default now()")
	@Column(name="f_CREATED_AT",nullable=false)
	@Temporal(TemporalType.TIMESTAMP)
	public Date getCreatedDate() {
		return createdDate;
	}
	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}
	
	@Column(name="f_UPDATED_AUTHOR",length=20)
	public String getStrUpdatedAuthor() {
		return strUpdatedAuthor;
	}
	public void setStrUpdatedAuthor(String strUpdatedAuthor) {
		this.strUpdatedAuthor = strUpdatedAuthor;
	}

	@Column(name="f_UPDATED_AT")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getUpdatedDate() {
		return updatedDate;
	}
	public void setUpdatedDate(Date updatedDate) {
		this.updatedDate = updatedDate;
	}
	
	@Column(name="f_father_name")
	public String getFatherName() {
		return fatherName;
	}
	public void setFatherName(String fatherName) {
		this.fatherName = fatherName;
	}
	
	@Column(name="f_mother_name")
	public String getMotherName() {
		return motherName;
	}
	public void setMotherName(String motherName) {
		this.motherName = motherName;
	}
	
	@Column(name="f_husband_name")
	public String getHusbandName() {
		return husbandName;
	}
	public void setHusbandName(String husbandName) {
		this.husbandName = husbandName;
	}
	
	@Column(name="f_dob")
	public Date getDob() {
		return dob;
	}
	public void setDob(Date dob) {
		this.dob = dob;
	}
	@Column(name="f_gender")
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	
	@Column(name="f_blood_group")
	public String getBloodGroup() {
		return bloodGroup;
	}
	public void setBloodGroup(String bloodGroup) {
		this.bloodGroup = bloodGroup;
	}
	
	@Column(name="f_phone")	
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	@Column(name="f_city_id")
	public Long getCityId() {
		return cityId;
	}
	public void setCityId(Long cityId) {
		this.cityId = cityId;
	}
	
	@Column(name="f_pin")
	public Long getPin() {
		return pin;
	}
	public void setPin(Long pin) {
		this.pin = pin;
	}
	
	@Column(name="f_photo_url")
	public String getPhotoUrl() {
		return photoUrl;
	}
	public void setPhotoUrl(String photoUrl) {
		this.photoUrl = photoUrl;
	}
	
	@Column(name="f_thumbnail_photo_url")
	public String getThumbnailPhotoUrl() {
		return thumbnailPhotoUrl;
	}
	public void setThumbnailPhotoUrl(String thumbnailPhotoUrl) {
		this.thumbnailPhotoUrl = thumbnailPhotoUrl;
	}
	
	@Column(name="f_address")
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	
	
}
